<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
$theme='theme1';
$appPath="/mms";
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Master project Management System',
		'theme'=>$theme,
	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
		'application.extensions.*',
		'application.extensions.debugtoolbar.*',
		'application.modules.rights.*', 
		'application.modules.rights.components.*',
	),

	'modules'=>array(
		// uncomment the following to enable the Gii tool
			'rights'=>array(
					'install'=>true,   // Enables the installer.
					//'superuserName'=>'admin',
					'userIdColumn'=>'user_id',    // Name of the user id column in the database.
					'userNameColumn'=>'user_id',
					'userClass' => 'UserAccount',
			),
		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'1234',
			// If removed, Gii defaults to localhost only. Edit carefully to taste.
			'ipFilters'=>array('127.0.0.1','::1'),
		),
		
	),

	// application components
	'components'=>array(
			'authManager'=>array(
					'class'=>'RDbAuthManager',   // Provides support authorization item sorting.        ......
			),
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>false,
			'class'=>'RWebUser',
		),
		'widgetFactory'=>array(
				'widgets'=>array(
						'CJuiAutoComplete' => array(
								'themeUrl' => $appPath.'/themes/'.$theme,
								'theme' => 'custom',
						),
						'CJuiDialog' => array(
								'themeUrl' => $appPath.'/themes/'.$theme,
								'theme' => 'custom',
						),
						'CJuiDatePicker' => array(
								'themeUrl' => $appPath.'/themes/'.$theme,
								'theme' => 'custom',
						),
							
						'CJuiTabs' => array(
								'themeUrl' => $appPath.'/themes/'.$theme,
								'theme' => 'custom',
						),
						'CJuiAccordion' => array(
								'themeUrl' => $appPath.'/themes/'.$theme,
								'theme' => 'custom',
						),
							
						'CJuiButton' => array(
								'themeUrl' => $appPath.'/themes/'.$theme,
								'theme' => 'custom',
						),
						
						'CGridView' => array(
								'cssFile' => $appPath.'/themes/'.$theme.'/gridview/styles.css',
								'baseScriptUrl'=> $appPath.'/themes/'.$theme.'/gridview/',
						),

		
				),
		),
			'authManager' => array(
					'class' => 'RDbAuthManager',
					'assignmentTable' => 'mms_authassignment',
					'itemTable' => 'mms_authitem',
					'itemChildTable' => 'mms_authitemchild',
					'rightsTable' => 'mms_rights',
			),
		// uncomment the following to enable URLs in path-format
		
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		
		'db'=>array(
			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
		),
		// uncomment the following to use a MySQL database
		
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=mms',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => 'db2003',
			'charset' => 'utf8',
		),
		
		'errorHandler'=>array(
			// use 'site/error' action to display errors
			'errorAction'=>'site/error',
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				
								array(
										'class'=>'XWebDebugRouter',
										'config'=>'alignLeft, opaque, runInDebug, fixedPos, yamlStyle',
										'levels'=>'error, warning, trace, profile, info',
										'allowedIPs'=>array('127.0.0.1'),
								),
								// uncomment the following to show log messages on web pages
								/*
								 array(
								 		'class'=>'CWebLogRoute',
								 ),
				*/

			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
	),
);